package admin

import "blog/app/model"

type name struct {
}

func (n *name) TableName() string {
	return "p_admin"
}

type Admin struct {
	name
	ID       int    `gorm:"column:id;primaryKey"`
	Account  string `gorm:"column:account"`
	Password string `gorm:"column:password"`
	Name     string `gorm:"column:name"`
	LastIp   string `gorm:"column:last_ip"`
	LastTime int    `gorm:"column:last_time"`
	model.SoftModel
}

type CreateAdmin struct {
	name
	Account  string `gorm:"column:account"`
	Password string `gorm:"column:password"`
	Name     string `gorm:"column:name"`
	model.SoftModel
}

type ListsAdmin struct {
	name
	Account  string `gorm:"column:account"`
	Password string `gorm:"column:password"`
	Name     string `gorm:"column:name"`
	model.SoftModel
}
